package view;

import controller.AddInvoiceController;
import controller.ViewInvoiceController;

public class MenuInvoicePanel extends javax.swing.JPanel {
	private static final long serialVersionUID = 1L;
	
	private Home home;
	public MenuInvoicePanel(Home home) {
		this.home = home;
        initComponents();
        controller();
    }

    private void initComponents() {

        toolbarInvoice = new javax.swing.JToolBar();
        btnViewIn = new javax.swing.JButton();
        btnAddIn = new javax.swing.JButton();

        setBackground(new java.awt.Color(255, 255, 255));
        setLayout(null);

        toolbarInvoice.setFloatable(false);
        toolbarInvoice.setOrientation(javax.swing.SwingConstants.VERTICAL);
        toolbarInvoice.setRollover(true);
        toolbarInvoice.setOpaque(false);

        btnViewIn.setFont(new java.awt.Font("Calibri", 1, 18));
        btnViewIn.setIcon(new javax.swing.ImageIcon("icon/viewInvoice.png")); 
        btnViewIn.setText("View Invoice");
        btnViewIn.setFocusable(false);
        btnViewIn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnViewIn.setOpaque(false);
        btnViewIn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        toolbarInvoice.add(btnViewIn);

        btnAddIn.setFont(new java.awt.Font("Calibri", 1, 18)); 
        btnAddIn.setIcon(new javax.swing.ImageIcon("icon/addInvoice.png")); 
        btnAddIn.setText("Add Invoice");
        btnAddIn.setFocusable(false);
        btnAddIn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnAddIn.setOpaque(false);
        btnAddIn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        toolbarInvoice.add(btnAddIn);

        add(toolbarInvoice);
        toolbarInvoice.setBounds(40, 80, 120, 140);
    }
    private javax.swing.JButton btnViewIn;
    private javax.swing.JButton btnAddIn;
    private javax.swing.JToolBar toolbarInvoice;
    
    
    private void controller(){
    	btnAddIn.addActionListener(new AddInvoiceController(home));
    	btnViewIn.addActionListener(new ViewInvoiceController(home));
    }
}
